package com.ms.dao.mapper.basic;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.eddy.dao.base.BaseDao;
import com.ms.dao.entity.basic.ResourcesEty;
import com.ms.dao.entity.basic.UserEty;
import com.ms.dao.entity.basic.UserRoleEty;

public interface UserDao extends BaseDao {
	
	@Select("select * from resources r where r.nodeId in (select resourceId from roleresource where roleId in (select roleId from userrole where userId = #{userId})) and r.parantNodeId = #{id} order by menuOrder")
	List<ResourcesEty> selectUserTree(UserRoleEty ety);
	
	@Select("select * from users where id=#{id}")
	public UserEty selectByUserId(int id);

}
